<?php
// +----------------------------
// | Created by PhpStorm
// +----------------------------
// | Author: YnnSon
// +----------------------------
namespace app\api\controller\v1;

use app\api\model\Gift as GiftModel;
use app\api\validate\GiftValidate;

/**
 * 奖品
 * Class Gift
 * @package app\api\controller\v1
 */
class Gift extends BaseController
{
    /**
     * @desc 检查用户权限
     */
    protected $beforeActionList = [
        'checkUserScope' => ['only' => 'getgiftlist'], // 方法名必须全部小写，逗号中间不能有空格！！！
    ];

    /**
     * @Desc 获取奖品列表
     *
     * @param $status
     *
     * @return array
     */
    public function getGiftList($status)
    {
        (new GiftValidate())->goCheck();
        return GiftModel::getGiftList($status);
    }
}